package com.yy.hi.okhttp2;

/**
 * User: gongyongfeng2@yy.com
 * Date: 2020/9/21 19 :52
 */
public class OkHttpClient {
    final Dispatch mDispatch;

    public OkHttpClient() {
        this(new Builder());
    }

    public OkHttpClient(Builder builder) {
        this.mDispatch = builder.mDispatch;
    }

    public RealCall newCall(Request request) {
        return RealCall.newCall(request, this);
    }

    public static class Builder {
        Dispatch mDispatch;

        //超时 https的证书 拦截器
        public Builder() {
            mDispatch = new Dispatch();
        }

        public OkHttpClient build() {
            return new OkHttpClient(this);
        }
    }
}
